package subumbo.demo.controller {
	import org.robotlegs.mvcs.Command;
	
	import subumbo.demo.model.WishModel;
	import subumbo.demo.view.ViewPool;
	import subumbo.demo.view.firework.Firework;
	import subumbo.demo.view.share.Share;

	public class PreviewCommand extends Command {
		
		[Inject] public var viewPool:ViewPool;
		[Inject] public var wishModel:WishModel;
		
		public override function execute():void {
			if(viewPool.wishForm)contextView.removeChild(viewPool.wishForm);
			viewPool.firework = new Firework();
			contextView.addChild(viewPool.firework);	
			viewPool.share = new Share();
			contextView.addChild(viewPool.share);
		}
		
	}
}